package com.yiboshi.rehrs.util;

import lombok.extern.slf4j.Slf4j;

import java.io.Closeable;
import java.io.IOException;

/**
 * @author local 2021/4/13
 */
@Slf4j
public class CloseUtils {

    public static void close(Closeable... closeables){
        for (Closeable closeable : closeables) {
            if(closeable==null){
                continue;
            }
            try {
                closeable.close();
            } catch (IOException e) {
                log.error("close IOException",e);
            }
        }

    }
}
